<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/vue.js"></script>
</head>
<body>
   <div id="app">
       <!--鼠标点击事件-->
       <button v-on:click="add">添加</button>
       <button v-on:click="deletes">删除</button>
       <br/>
       <button @click="isShow">{{info}}</button>
       <label v-if="show">show</label>
   </div>
</body>
<script>

    var app = new Vue({
        el:"#app",
        data:function () {
            return {
                show:false,
                info:"显示"
            };
        },
        methods:{
            add:function () {
                console.log("add");
            },
            deletes:function () {
                console.log("delete");
            },
            isShow:function () {
                if(this.show == true){
                    this.info = "显示";
                }else{
                    this.info = "隐藏";
                }
                this.show  = !this.show;
            }
        }
    });

</script>
</html>